Skip to content

support 'code' in hasSelectionInBlock (see react-draft-wysiwyg)#34

Open
lefnire wants to merge 1 commit into
SamyPesse:masterfrom
lefnire:master
Open

support 'code' in hasSelectionInBlock (see react-draft-wysiwyg)#34
lefnire wants to merge 1 commit into
SamyPesse:masterfrom
lefnire:master

Conversation

@lefnire

@lefnire lefnire commented Jan 10, 2018

Copy link
Copy Markdown

I'm new to Draft, I don't know if code-block is a standard and should be followed, or if you get to make your own or what. https://github.com/jpuri/react-draft-wysiwyg inserts code, so this adds support for that (alternatively ~currentBlock.getType().indexOf('code') in case other editors use codeblock or whatever).

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.265% when pulling ebcd057 on lefnire:master into c219dc5 on SamyPesse:master.

@lefnire

lefnire commented Jan 10, 2018

Copy link
Copy Markdown
Author

Ah, <pre> maps to code-block, and <code> to code. So this PR should cover everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants